Additive AND/OR Graphs

نویسندگان

  • Alberto Martelli
  • Ugo Montanari
چکیده

A d d i t i v e AND/OR graphs are de f ined as AND/ /ORgraphs w i t hou t c i r c u i t s , which can be cons idered as fo lded AND/OR t r e e s ; i . e . the cost of a common subproblem is added to the cost as many t imes as the subproblem occurs , but i t is computed on ly once. A d d i t i v e AND/OR graphs are n a t u r a l l y obta ined by r e i n t e r p r e t i n g the dy namic programming method in the l i g h t of the prob lem-reduct ion approach. An example of t h i s r educ t i on i s g i v e n . A top-down and a bottom-up method are p ro posed f o r searching a d d i t i v e AND/OR graphs. These methods a re , r e s p e c t i v e l y , extensions of the "arrow" method proposed by N i l sson f o r searching AND/OR t r ees and D i j k s t r a ' s a l g o r i t h m f o r f i n d i n g the sho r tes t p a t h . A proof is g iven t h a t the two methods f i n d an op t ima l s o l u t i o n whenever a s o l u t i o n e x i s t s . 1) i n t r o d u c t i o n I n the l i t e r a t u r e o n a r t i f i c i a l i n t e l l i gence, AND/OR t rees have proved to be a good formal ism f o r rep resen t i ng the problem-reduct i o n approach to problem so l v i ng . Usua l l y , the search is f o r any s o l u t i o n t r e e , but in a paper by N i l sson the problem is presented of f i n d i n g the best s o l u t i o n t r e e , where arcs have a g iven c o s t , and the cost of a t r e e is s imply the sum of the cos ts of the a r c s . N i l s son g ives the re an a l g o r i t h m which as sumes a v a i l a b l e , f o r each node, an est imate of the cos t o f the "opt imal s o l u t i o n t r e e roo ted a t t h a t node. An a l g o r i t h m f o r searching AND/OR graphs has been proposed by Chang and S l a g l e 3 . Here a s o l u t i o n graph is de f ined in the usual way, and, as f o r t r e e s , the cos t of a s o l u t i o n graph is the sum of the cos ts of i t s a r c s . In t h i s paper we in t roduce a new type of AND/OR graphs c a l l e d a d d i t i v e , which can be considered as fo lded AND/OR t r e e s , i . e . t r ees where d i f f e r e n t nodes have been recognized to be roo ts of equal subtrees and have been i d e n t i f i e d , thus genera t ing AND/OR graphs w i thou t c i r c u i t s . However, the cost of a s o l u t i o n subgraph is de f ined as equal to the cost o f the unfo lded equ iva len t t r e e . In o ther words, the cost of a common subproblem is added to the cost as many t imes as the subproblem occurs , but i t i s computed on l y once. A d d i t i v e AND/OR graphs are n a t u r a l l y obta ined by r e i n t e r p r e t i n g the dynamic programming method o f o p t i m i z a t i o n in the l i g h t o f the p rob lem-reduc t ion approach 4 . For g i v i n g an idea of the technique of r e d u c t i o n , we w i l l consider here the w e l l -known problem of ha lanc ing b ina ry search t r e e s , solved by Knuth v i i t h a (modif ied) dynamic programming a l g o r i t h m " . Here a number o f ordered i tems ( l e x i c o g r a p h i c a l l y ordered words, f o r ins tance) are g i v e n , together w i t h p r o b a b i l i t i e s of a new i tem occurence to be any of the g iven i tems or to be a new i tem located in any in te rmed ia te p o s i t i o n . For example, the data mean t h a t there are 3 p r o b a b i l i t i e s out of 31 t h a t a new word w i l l be "do" and 3 n r o h a h i l i t i e s t h a t a new word w i l l be any word between "do" and " i f " . A b ina ry search t r e e f o r these data is a t r e e o f the type shown in F i g . 1 . For ins tance i f the new word "a r ray " i s generated, i t s proper l o c a t i o n is found by means of three t e s t s , namely comparisons w i t h the given words " i f " and "beg in" r e s p e c t i v e l y and a terminat i o n t e s t . Given a search t r e e , the average number of t e s t s M necessary f o r reaching a node, is then g iven by summing up the products of the number mj. of t e s t s requ i red f o r any node i and i t s p r o b a b i l i t y p1 For i ns tance , the average number of t e s t s f o r the t r e e in F i g . 1 i s The problem is to f i n d a search t r e e w i t h min imal cos t M. For i ns tance , the t r e e of Fig.1 i s op t ima l f o r the data ( 1 ) . An equ i va len t f o rmu la t i on of the same problem considers f requencies ins tead of p r o b a b i l i t i e s . I n t h i s case the cost i s c a l l e d weighted path l e n g t h . Two p r o p e r t i e s a l l ow the use of a dynamic programming technique i n t h i s case. F i r s t , i f T = (a A 8) is an op t ima l t r e e rooted in A and having a and 6 as sub t rees , then both o and B are o p t i m a l . Fur thermore, the data f o r a and S are d i s j o i n t subs t r i ngs of the data f o r T. Second, i f fA , fa , fB ' L a 'B are the f requencies of A,o and 8 and the weighted In the dynamic programming algori thm, a l l the subproblems of the given problem are considered, whose data are substrings of the given data. Such problems are divided in lev e l s , according to the length of the data, and solved in increasing order* A problem at a leve l can be solved by picking up a root in a l l possible ways* (say JO and thus decomposing the problem in k pairs of subproblems at lower leve ls . The cost of every decomposition is computed using (2)and a best decomposition is chosen. The optimal search tree problem described above is a good example of the gener al case where, at each stage, the computat i on of each a l ternat ive requires the sum of the costs of one or more ( in f ac t , two) sub problems. In th i s case, the structure of the problem is conveniently ref lected in to an addi t ive AND/OR graph, whose AND nodes correspond to subproblem cost sums, and OR nodes to a l t e r native select ions. For instance, the AND/OR graph for the optimal search tree problem, with data (1) , is shown in F ig . 2. There,AND nodes are marked wi th c i r c les and OR nodes (corresponding to subproblems) wi th squares. The optimal solut ion graph, corresponding to the search tree in F ig . 1, is blackened. Reduction of dynamic programming to addit1 ve AND/OR graphs can imply several advantages. F i r s t , the AND/OR graph expresses the structure of the problem in the form of a p a r t i a l ordering of subproblems. Dynamic pro gramming solves a l l the subproblems bottom-up in some s ta t i c order which respects the p a r t i a l orderings. However,in Section 4 of th is paper a bottom-up algorithm is descr i bed, which solves every time the cheapest avai lable subproblem, thus considering, in general, only a subset of subproblems in a (*) Actua l ly , Knuth gives a modified dynamic programming algorithm which excludes a p r i o r i most of the decompositions, using a par t i cu la r monotonieity property. dynamic order. Second, in many cases estimates of the subproblem costs are avai lab le , which can be used for d i rec t ing a top-down search. In f a c t , in Section 3 we give an extension of Nl lsson's t ree algorithm to the addi t ive graph case, which, if the estimate is a lower bound of the minimal cost , is guaranteed to f i nd the o p t i mal solut ion graph. The algorithm is s l i g h t l y s imp l i f ied i f the estimate sa t i s f i es a "consistency" constra int . F ina l l y , various known heur is t ic techniques can be applied to a d d i t i ve AND/OR graphs,which can f ind a good solut i on where the exact dynamic programming algor i thm is too Expensive. We emphasize that th i s paper extends to general dynamic programming a reduction technique which is well-known in the so cal led "sequential" case. There, each a l ternat ive can be computed by summing a constant to the cost of one simpler subproblem, thus reducing an addi t ive AND/OR graph to an OR graph. In th i s case, a solut ion tree reduces to a path and thus shortest path algorithms apply, l i ke D i j ks t ra ' s algorithm in the uninformed case and the algorithm by Hart, Ni lsson, and Raphael i f an estimate is avai lab le . F ina l l y , note that in the shortest path case no d i s t i nc t i on between top-down and bottom-up is needed, while i t is suggestive in the general case. 2) Addit ive AND/OR Graphs In t h i s paper, we shal l consider AND/OR graphs without cycles. An example is given in F ig . 3. Node A is cal led the s ta r t node and represents the problem to be solved. Node A is cal led an OR node,(*) because a solut ion is constructed by select ing ei ther i t s successor B or i t s successor C. Node B is cal led an AND node, because a l l of the suboroblems represent ed by i t s successors D and E must be solved in order to solve problem B. An AND node is i n d i cate by a l ine across the arcs connecting it to the successor nodes. Nodes G and H are c a l led terminal nodes and correspond to problems wi th known so lu t ion . We assume that a l l the nonterminal nodes are e i ther OR nodes or AND nodes, that i s , there are no nodes corresponding to problems which can be solved by solving some of the i r successors. We give here a de f i n i t i on of OR nodes and AND nodes, which is opposite to the one given by Ni lsson . We do so, because we want each node to be ei ther an OR node or an AND node, instead, wi th Nl lsson's d e f i n i t i o n , we could have a node which is at the same time an OR node because of one parent and an AND node because of another parent. W e s h a l l b e c o n c e r n e d w i t h A N D / O R g r a p h s i m p l i c i t l y s p e c i f i e d by a s t a r t node s and a s u c c e s s o r o p e r a t o r T . A p p l i c a t i o n o f r t o any node n q e n e r a t e s a f i n i t e number o f s u c c e s s o r s o f n and a l a b e l s n e c i f y i n o w h e t h e r t h e s u c c e s s o r s a r e AND nodes or OR n o d e s , A s o l u t i o n g r a p h of an AND/OR g r a n h G w i t h s t a r t node s i s any suhoranh o f P c o n t a i n i n g s and h a v i n o t h e f o l l o w i n g p r o p e r t i e s ; (1) Suppose node n of P is an OR node and i s i n c l u d e d i n t h e s o l u t i o n o r a p h . Then one and o n l y one o f t h e s u c c e s s o r s o f n i s a l s o i n c l u d e d i n t h e s o l u t i o n g r a p h . (2) Suppose node n of R is an AND node and i s i n c l u d e d i n t h e s o l u t i o n g r a p h . Then a l l o f t h e s u c c e s s o r s o f n a r e a l s o i n c l u d e d i n t h e s o l u t i o n o r a n h . (3) The s o l u t i o n g r a n h i s f i n i t e , meanlno t h a t i t ends i n a s e t o f t e r m i n a l n o d e s , F ig . 4 shows two s o l u t i o n o ranhs o f t h e A N D / O R q r a p h i n F i g . 3 . I n g e n e r a l , a c o s t i s a s s o c i a t e d w i t h e v e r y a r c o f a n AND/OR G r p h . L e t t h e f u n c t i o n c ( n , n . ) g i v e t h e c o s t t o h e a s s o c i a t e d w i t h t h e a re c o n n e c t i n g node n i w i t h one o f i t s s u c c e s s o r s n j . F o r a d d i t i v e AND/OR o ranhs t h e c o s t o f a s o l u t i o n g r a n h i s r e c u r s i v e l y d e f i n e d a s f o l l o w s : (1) The c o s t c * 0 is a s s o c i a t e d w i t h e v e r v t e r m i n a l node i n t h e s o l u t i o n o r a n h . (2) L e t c 1 , — , c k b e t h e c o s t s a s s o c i a t e d w i t h t h e k s u c c e s s o r s o f node n i n t h e s o l u t i o n o r a n h . Then w e a s s o c i a t e w i t h n t h e c o s t c o i v e n b y ( * ) k C = 2 _ ( c , + c ( n , n ))

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

On the edge-connectivity of C_4-free graphs

Let $G$ be a connected graph of order $n$ and minimum degree $delta(G)$.The edge-connectivity $lambda(G)$ of $G$ is the minimum numberof edges whose removal renders $G$ disconnected. It is well-known that$lambda(G) leq delta(G)$,and if $lambda(G)=delta(G)$, then$G$ is said to be maximally edge-connected. A classical resultby Chartrand gives the sufficient condition $delta(G) geq frac{n-1}{2}$fo...

متن کامل

On multiplicative Zagreb indices of graphs

Todeschini et al. have recently suggested to consider multiplicative variants of additive graph invariants, which applied to the Zagreb indices would lead to the multiplicative Zagreb indices of a graph G, denoted by ( ) 1  G and ( ) 2  G , under the name first and second multiplicative Zagreb index, respectively. These are define as     ( ) 2 1 ( ) ( ) v V G G G d v and ( ) ( ) ( ) ( ) 2...

متن کامل

Collective Tree Spanners in Graphs with Bounded Genus, Chordality, Tree-Width, or Clique-Width

In this paper we study collective additive tree spanners for special families of graphs including planar graphs, graphs with bounded genus, graphs with bounded tree-width, graphs with bounded cliquewidth, and graphs with bounded chordality. We say that a graph G = (V,E) admits a system of μ collective additive tree r-spanners if there is a system T (G) of at most μ spanning trees of G such that...

متن کامل

Collective Tree Spanners and Routing in AT-free Related Graphs

In this paper we study collective additive tree spanners for families of graphs that either contain or are contained in AT-free graphs. We say that a graph G = (V,E) admits a system of μ collective additive tree r-spanners if there is a system T (G) of at most μ spanning trees of G such that for any two vertices x, y of G a spanning tree T ∈ T (G) exists such that dT (x, y) ≤ dG(x, y) + r. Amon...

متن کامل

Additive Bases and Extremal Problems in Groups, Graphs and Networks

Bases in sets and groups and their extremal problems have been studied in additive number theory such as the postage stamp problem. On the other hand, Cayley graphs based on specific finite groups have been studied in algebraic graph theory and applied to construct efficient communication networks such as circulant networks with minimum diameter (or transmission delay). In this paper we establi...

متن کامل

Additive Stabilizers for Unstable Graphs

Stabilization of graphs has received substantial attention in recent years due to its connection to game theory. Stable graphs are exactly the graphs inducing a matching game with non-empty core. They are also the graphs that induce a network bargaining game with a balanced solution. A graph with weighted edges is called stable if the maximum weight of an integral matching equals the cost of a ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1973